package com.example.mqtt.demo.config;

/**
 * <B>概要说明：</B> <BR>
 *
 * @author zhoulin1@xsyxsc.com
 * @since 2021-07-21 16:23
 */
public abstract class MqttConfig {

    protected final String broker = "127.0.0.1";
    protected final int qos = 1;
    protected Boolean hasSSL = false;
    protected Integer port = 1883;
    protected final String userName = "admin";
    protected final String password = "public";
    protected final String TCP = "tcp://";
    protected final String SSL = "ssl://";

    /**
     * Custom Configuration
     *
     * @param broker
     * @param port
     * @param ssl
     * @param withUserNamePass
     */
    protected abstract void config(String broker, Integer port, Boolean ssl, Boolean withUserNamePass);

    /**
     * Default Configuration
     */
    protected abstract void config();
}
